package Book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2023-11-29
 * Time: 17:52
 */
public class book {
    private String name;
    private String author;
    private int price;
    private String typle;
    private boolean isBoorwed;

    public book(String name, String author, int price, String typle) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.typle = typle;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getTyple() {
        return typle;
    }

    public void setTyple(String typle) {
        this.typle = typle;
    }

    public void setBoorwed(boolean boorwed) {
        isBoorwed = boorwed;
    }

    @Override
    public String toString() {
        return "book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", typle='" + typle + '\'' +
                ((isBoorwed==true?"已借出":"未借出"))+
                '}';
    }
}